function strToBoolean(str) {
    return typeof str === "string" ? JSON.parse(str) : str
}
const findComponentUpward = (context, componentName= ["LowcodeForm",
    "lowcode_form",
    "lowcode_view",
    "LowcodeView",]) => {
    let parent = context.$parent
    let name = parent.$options.name
    while (parent && (!name || !componentName.some(cn => name.indexOf(cn) > -1))) {
      parent = parent.$parent
      if (parent) name = parent.$options.name
    }
    return parent
  }
export {
    findComponentUpward,
    strToBoolean
}